<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>个人信息</title>
<link rel="stylesheet" th:href="@{/styles.css}" />
</head>
<body>

    <div align="center">
    	<img th:src="校门.jpeg">
    </div>
    
   	<form method="POST" th:action="@{/logout}" id="logoutForm">
	   	<div align="center" th:if="${nowUser} ne null">
	      	<h2><p th:text="当前用户：+${nowUser.username}"></h2>
	      	<input type="submit" value="退出登录"/>
		</div>
    </form>
    
	<form method="POST" th:object="${personinfo}">
	 <input th:name="${_csrf.parameterName}"  type="hidden" th:value="${_csrf.token}" />
	<div align="center">
		<h1>个人信息页面</h1>
		<table>
			<tr>
				<td>学号：</td>
				<td><input type="text" th:field="*{stuNo}"></td>
				<td>      
					<span class="validationError"
				            th:if="${#fields.hasErrors('stuNo')}"
				            th:errors="*{stuNo}">Name Error</span>
					<br/>
				</td>
			</tr>
			<tr>
				<td>学生姓名：</td>
				<td><input type="text" th:field="*{stuName}"></td>
				<td>      
					<span class="validationError"
				            th:if="${#fields.hasErrors('stuName')}"
				            th:errors="*{stuName}">Name Error</span>
					<br/>
				</td>
			</tr>
			<tr>
				<td>班级：</td>
				<td><input type="text" th:field="*{stuClass}"></td>
				<td>      
					<span class="validationError"
				            th:if="${#fields.hasErrors('stuClass')}"
				            th:errors="*{stuClass}">Name Error</span>
					<br/>
				</td>
			</tr>
			<tr>
				<td>学院：</td>
				<td><input type="text" th:field="*{stuCollege}"></td>
				<td>      
					<span class="validationError"
				            th:if="${#fields.hasErrors('stuCollege')}"
				            th:errors="*{stuCollege}">Name Error</span>
					<br/>
				</td>
			</tr>
			<tr>
				<td><input type="submit" value="提交"></td>
				<td><button> <a th:href="@{/}">返回主界面</a></button></td>
			</tr>
			
		</table>
	</div>
	</form>
</body>
</html>